import request from '@/utils/request'

// 查询菜单管理列表
export function listRestsurant(query) {
  return request({
    url: '/restaurant/menu/list',
    method: 'get',
    params: query
  })
}

// 查询所有菜单（不分页，用于点单）
export function listAllMenu(query) {
  return request({
    url: '/restaurant/menu/all',
    method: 'get',
    params: query
  })
}

// 查询菜单管理详细
export function getRestsurant(id) {
  return request({
    url: '/restaurant/menu/' + id,
    method: 'get'
  })
}

// 新增菜单管理
export function addRestsurant(data) {
  return request({
    url: '/restaurant/menu',
    method: 'post',
    data: data
  })
}

// 修改菜单管理
export function updateRestsurant(data) {
  return request({
    url: '/restaurant/menu',
    method: 'put',
    data: data
  })
}

// 删除菜单管理
export function delRestsurant(id) {
  return request({
    url: '/restaurant/menu/' + id,
    method: 'delete'
  })
}

// 删除菜单管理
export function deleteLists(data) {
  return request({
    url: '/restaurant/menu/deleteLists',
    method: 'post',
    data: data
  })
}
// 导出菜单管理
export function exportRestsurant(query) {
  return request({
    url: '/restaurant/menu/export',
    method: 'get',
    params: query
  })
}